package ro.savatech.pg.ui;

import java.awt.BorderLayout;
import java.awt.GridBagLayout;
import java.awt.LayoutManager;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class MainFrame extends JFrame {
	private JMenuBar menuBar;
	private JMenu fileMenu;

	public MainFrame() {
		initComponents();
		this.setSize(800, 600);
	}

	private void initComponents() {
		LayoutManager layout = new GridBagLayout();

		JLabel label = new JLabel("asdfasfas");
		JPanel mainPanel = new JPanel();
		mainPanel.setLayout(layout);
		mainPanel.add(label);

		this.setContentPane(mainPanel);

		initMenu();
	}

	private void initMenu() {
		this.menuBar = new JMenuBar();

		this.fileMenu = new JMenu("File");

		JMenuItem jMItemOpeDumpFile = new JMenuItem("Open dump file");
		this.fileMenu.add(jMItemOpeDumpFile);

		this.fileMenu.addSeparator();

		JMenuItem jMItemQuit = new JMenuItem("Quit");
		this.fileMenu.add(jMItemQuit);

		this.menuBar.add(this.fileMenu);
		this.setJMenuBar(this.menuBar);
	}
}
